/**
 * 角色相关请求模块
 */

import request from '@/utils/request'

export const getRoles = (data) => {
  return request({
    method: 'GET',
    url: '/api/Role/Get',
    params: data
  })
}

export const deleteRole = (id) => {
  return request({
    method: 'DELETE',
    url: '/api/Role/Delete',
    params: id
  })
}

export const createOrUpdate = (data) => {
  return request({
    method: 'POST',
    url: '/api/Role/Post',
    data
  })
}

export const getRoleById = (id) => {
  return request({
    method: 'GET',
    url: `/api/Role/Get/${id}`
  })
}
